const fs = require("fs");
const path = require("path");

function err(err) {
  console.log(err, "@@@@");
}

// 同步读取
const files = fs.readdirSync(path.resolve(__dirname, "./dist"), err);
console.log("同步读取", files); // 返回数组
